package com.kaishengit.entity;

public class Sale {
	private String id;
	private String time;
	private String comp_id;
	private String tr_id;
	private String from;
	private float totalmoney;
	private float unitmoney;
	private int num;

	
	public void setUnitmoney(float unitmoney) {
		this.unitmoney = unitmoney;
	}
	public int getNum() {
		return num;
	}
	public void setNum(int num) {
		this.num = num;
	}
	
	public String getTime() {
		return time;
	}
	public void setTime(String time) {
		this.time = time;
	}
	
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getComp_id() {
		return comp_id;
	}
	public void setComp_id(String comp_id) {
		this.comp_id = comp_id;
	}
	public String getTr_id() {
		return tr_id;
	}
	public void setTr_id(String tr_id) {
		this.tr_id = tr_id;
	}
	public String getFrom() {
		return from;
	}
	public void setFrom(String from) {
		this.from = from;
	}
	public float getTotalmoney() {
		return totalmoney;
	}
	public void setTotalmoney(float totalmoney) {
		this.totalmoney = totalmoney;
	}
	public float getUnitmoney() {
		
		if(this.totalmoney>0&&this.num>0){
			unitmoney=totalmoney/num;
			
		}
		return unitmoney;
	}
	
}
